package com.dlc.shop.systemtest.data.amount;

import cn.hutool.crypto.SecureUtil;
import cn.hutool.crypto.symmetric.AES;
import com.dlc.shop.security.common.dto.AuthenticationDTO;

import java.nio.charset.StandardCharsets;

/**
 * @author lanhai
 */
public class UserData {
    public static AuthenticationDTO  getAuthenticationDTO(String username,String password){
        SecureUtil.disableBouncyCastle();
        AES aes = new AES("-mall4j-password".getBytes(StandardCharsets.UTF_8));
        password = aes.encryptBase64(System.currentTimeMillis() + password);
        AuthenticationDTO authenticationDTO = new AuthenticationDTO();
        authenticationDTO.setUserName(username);
        authenticationDTO.setPassWord(password);
        return authenticationDTO;
    }
}
